package com.changpay.zywy.adapter

import android.content.Context
import android.graphics.Color
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.changpay.zywy.R
import com.changpay.zywy.bean.ProjectBean

/**
 * Created by chenxz on 2018/4/22.
 */
class ProjectAdapter(private val context: Context?, datas: MutableList<ProjectBean>)
    : BaseQuickAdapter<ProjectBean, BaseViewHolder>(R.layout.item_project, datas) {

    override fun convert(helper: BaseViewHolder?, item: ProjectBean?) {
        item ?: return
        helper ?: return
        helper.setText(R.id.tv_name,item.gc_name)
        if (item.isSelected)
        {
            helper.setTextColor(R.id.tv_name,Color.parseColor("#FABF13"))
        }else
        {
            helper.setTextColor(R.id.tv_name,Color.parseColor("#825F03"))
        }
    }

}
